织梦cms

推荐列表 站点导航

当前位置:首页 > 建站教程 > 织梦cms >

dedecms 5.5 伪静态设置方法

来源:网络整理  作者:  发布时间:2020-12-15 12:53
首先我们给虚拟主机加上伪静态规则,Apache和IIS的详细设置如下,虚拟主机是否支持伪静态,请咨询你的虚拟主机提...
然后我们修改dedecms的程序,打开include\channelunit.func.php

$reurl = $GLOBALS['cfg_phpurl']."/list-".$typeid.".html";

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3
以上修改适用于dedecms 5.5版,其他版本可能稍微有些区别。
RewriteRule plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?arcID=$1&pageno=$3
首先我们给虚拟主机加上伪静态规则,Apache和IIS的详细设置如下,虚拟主机是否支持伪静态,请咨询你的虚拟主机提供商。
<IfModule mod_rewrite.c>
查找

RewriteRule ^(.*)/plus/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3
替换为
代码:
IIS的服务器,在httpd.ini里面写上,前提是要服务器安装过ISAPI Rewrite

RewriteRule ^(.*)/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html $1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4

</IfModule>

RewriteRule ^(.*)/index\.html $1/index\.php
如果是Apache的服务器,就在.htaccess里面写上

RepeatLimit 32
CacheClockRate 3600
代码:


RewriteRule index\.html /index\.php
RewriteEngine On

代码:
RewriteRule plus/list-([0-9]+)\.html$ /plus/list.php?tid=$1
代码:
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;


[ISAPI_Rewrite]
# 缓存3600秒 = 1 小时(hour)

RewriteRule ^(.*)/plus/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2

RewriteCond %{REQUEST_FILENAME} !-d

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/jz/dedecms/4133.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

dedecms 5.5 伪静态设置方法

2020-12-15 编辑:

然后我们修改dedecms的程序,打开include\channelunit.func.php

$reurl = $GLOBALS['cfg_phpurl']."/list-".$typeid.".html";

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3
以上修改适用于dedecms 5.5版,其他版本可能稍微有些区别。
RewriteRule plus/view-([0-9]+)-([0-9]+)\.html$ /plus/view.php?arcID=$1&pageno=$3
首先我们给虚拟主机加上伪静态规则,Apache和IIS的详细设置如下,虚拟主机是否支持伪静态,请咨询你的虚拟主机提供商。
<IfModule mod_rewrite.c>
查找

RewriteRule ^(.*)/plus/view-([0-9]+)-([0-9]+)\.html $1/plus/view\.php\?arcID=$2&pageno=$3
替换为
代码:
IIS的服务器,在httpd.ini里面写上,前提是要服务器安装过ISAPI Rewrite

RewriteRule ^(.*)/plus/list-([0-9]+)-([0-9]+)-([0-9]+)\.html $1/plus/list\.php\?tid=$2&TotalResult=$3&PageNo=$4

</IfModule>

RewriteRule ^(.*)/index\.html $1/index\.php
如果是Apache的服务器,就在.htaccess里面写上

RepeatLimit 32
CacheClockRate 3600
代码:


RewriteRule index\.html /index\.php
RewriteEngine On

代码:
RewriteRule plus/list-([0-9]+)\.html$ /plus/list.php?tid=$1
代码:
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;


[ISAPI_Rewrite]
# 缓存3600秒 = 1 小时(hour)

RewriteRule ^(.*)/plus/list-([0-9]+)\.html $1/plus/list\.php\?tid=$2

RewriteCond %{REQUEST_FILENAME} !-d

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/jz/dedecms/4133.shtml

相关文章

风云图片

推荐阅读

返回织梦cms频道首页